package com.starlight.flower_server.controller;

import com.starlight.flower_server.domain.TotalData;
import com.starlight.flower_server.domain.order.data.OrderData;
import com.starlight.flower_server.domain.role.data.RoleData;
import com.starlight.flower_server.domain.service.RoleService;
import com.starlight.flower_server.infrastructure.FlowerServerResponse;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author yfy2001
 * @date 2023/4/5 15:28
 * 权限接口
 */
@RestController
@RequestMapping("/role")
public class RoleController {

    @Resource
    private RoleService roleService;

    @GetMapping("/getAllRoleData")
    public FlowerServerResponse<TotalData<RoleData>> getAllRoleData(){
        return FlowerServerResponse.success(roleService.queryAllRoleData());
    }
}
